package com.happy.people.control;


import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Author : Yan
 * @Description : 这是登陆 control
 */
@Controller
@Transactional
@RequestMapping(value = "/login")
public class LoginController {

    /**
     * @author : Mr.Yan
     * @create : 2020/1/2
     * @description : 这是跳转登陆页页面
     */
    @RequestMapping(value = "")
    public String login() {
        return "login";
    }

    /**
     * @author : Mr.Yan
     * @create : 2020/1/4
     * @description : 这是跳转首页的方法
     */
    @RequestMapping(value = "/main")
    public String main() {
        return "main/main";
    }

    @RequestMapping(value = "/pay")
    public ModelAndView pay(String url) {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("url",url);
        modelAndView.setViewName("main/wechat");
        return modelAndView;
    }
}
